<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <title></title>
    <!--preload-links-->
    <!--app-context-->

    <script>
      // 检测是否支持 env(safe-area-inset-*) 或 legacy constant()
      var coverSupport = 'CSS' in window && 
                         typeof CSS.supports === 'function' && 
                         (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'));

      // 创建 viewport meta 标签
      var meta = document.createElement('meta');
      meta.name = 'viewport';
      meta.content = 'width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
                     (coverSupport ? ', viewport-fit=cover' : '');
      
      // 插入到 <head> 中
      document.head.appendChild(meta);
    </script>
  </head>
  <body>
    <div id="app"><!--app-html--></div>
    <script type="module" src="/main.js"></script>
  </body>
</html>